package com.neuedu.extend;

/**
 *   动物
 */
public class Animal {

    public String name;
    public double weight;

    static{
        System.out.println("Animal.static initializer");
    }

    public Animal(){
        System.out.println("Animal.Animal 1()");
    }

    public Animal(String name , double weight){
        System.out.println("Animal.Animal 2(String name , double weight)");
        this.name = name;
        this.weight = weight;
    }


    /**
     * 表演
     */
    public void show(){
        System.out.printf("%s 在表演 \r\n \r\n",name);
    }


    public void eat(){
        System.out.printf("%s 在吃饭 \r\n \r\n",name);
    }



}
